import java.util.Scanner;

public class Solution3 {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int n1 = num.nextInt();
        int n2 = num.nextInt();
        int[] nums1 = new int[n1];
        int[] nums2 = new int[n2];
        for (int i = 0; i < n1; i++) {
            nums1[i] = num.nextInt();
        }
        for (int i = 0; i < n2; i++) {
            nums2[i] = num.nextInt();
        }
    }

    public static int[] intersect(int[] nums1, int[] nums2) {
        int len = nums1.length < nums2.length ? nums1.length : nums2.length;
        int[] arr = new int[len];

        return arr;
    }
}
